package day07;

import com.mchange.v2.c3p0.ComboPooledDataSource;

import java.sql.Connection;
import java.sql.SQLException;

public class TestDemo {
    public static void main(String[] args) throws SQLException {
        //创建c3p0连接池的对象,参数里写配置名，可以选择别的配置信息
        ComboPooledDataSource cs=new ComboPooledDataSource();
        for (int i = 1; i <=10 ; i++) {
            //通过连接池对象获取连接对象conn
            Connection conn=cs.getConnection();
            System.out.println("第"+i+"个Connection对象"+conn);
        }
    }
}
